﻿<common:LayoutAwarePage x:Name="pageRoot"
                        x:Class="FantasyWereld.Views.ErrorPage"
                        DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:local="using:FantasyWereld"
                        xmlns:data="using:FantasyWereld.Data"
                        xmlns:common="using:FantasyWereld.Common"
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        mc:Ignorable="d"
                        d:DesignWidth="1366"
                        d:DesignHeight="768">

    <Grid Style="{StaticResource LayoutRootStyle}"
          Background="#EE9606">

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="400" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center">
            <Image x:Name="extendedSplashImage"
                   Source="/Assets/ErrorImage.png" Width="600" />
        </StackPanel>

        <StackPanel x:Name="panel2"
                    Grid.Row="1"
                    HorizontalAlignment="Center"
                    Width="600">
            <TextBlock Text="Onze excused, maar er is een fout opgetreden op de FantasyWereld app"
                       Style="{StaticResource HeaderTextStyle}"
                       TextWrapping="Wrap"
                       TextAlignment="Center"
                       Padding="5"
                       HorizontalAlignment="Center"
                       Foreground="White" />
            <TextBlock Text="Op de achtergrond hebben we de fout geprobeerd te herstellen. Sluit de app helemaal af en probeer deze opnieuw op te starten. Mocht ook dit niet lukken dan moet de app even verwijderd en opnieuw geïnstalleerd worden."
                       Style="{StaticResource BasicTextStyle}"
                       TextWrapping="Wrap"
                       TextAlignment="Center"
                       Padding="5"
                       HorizontalAlignment="Center"
                       Foreground="White" />
        </StackPanel>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape" />
                <VisualState x:Name="Filled" />
                <VisualState x:Name="FullScreenPortrait" />

                <!-- The back button and title have different styles when snapped -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="extendedSplashImage"
                                                       Storyboard.TargetProperty="Width">
                            <DiscreteObjectKeyFrame KeyTime="0"
                                                    Value="300" />
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="panel2"
                                                       Storyboard.TargetProperty="Width">
                            <DiscreteObjectKeyFrame KeyTime="0"
                                                    Value="300" />
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>
